package edu.ptu.shortlink.project.common.constant;

/**
 * @BelongsProject: shortlink
 * @BelongsPackage: edu.ptu.shortlink.project.common.constant
 * @Author: HYJ
 * @CreateTime: 2025-04-30  18:46
 * @Description: redis 缓存常量类
 * @Version: 1.0
 */
public class RedisKeyConstant {

    /**
     * 短链接跳转锁前缀 (防止短链接重复生成)
     */
    public static final String LOCK_SHORT_LINK_GOTO_KEY = "short-link:lock:goto:%s:";

    /**
     * 短链接跳转前缀 存储有效数据 删除后触发重新查询
     */
    public static final String GOTO_SHORT_LINK_KEY = "short-link:goto:%s:";

    /**
     * 短链接是否存在前缀 防止穿透的临时标记
     * 有值标识短链接不存在
     * 无值标识短链接存在
     */
    public static final String SHORT_LINK_IS_NULL_KEY = "short-link:is-null:goto:%s:";
    /**
     * 短链接分组修改前缀
     */
    public static final String LOCK_GID_UPDATE_KEY = "short-link:lock_:id_update:%s:";
}
